package org.jgs1904.springsecurityoauth2authorizationcode.controller;

import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: 默苍璃
 * @date: 2023-11-17 17:59
 */
@RestController
@RequestMapping("/actuator/user")
public class UserController {

    @GetMapping("/getCurrentUser")
    public Object getCurrentUser(Authentication authentication) {
        // return authentication.getPrincipal();
        return authentication;
    }


}
